Skip to content

docs: improve document content with ai#103

Open
aa900031 wants to merge 15 commits intomainfrom
docs/improve-document-content-with-ai
Open

docs: improve document content with ai#103
aa900031 wants to merge 15 commits intomainfrom
docs/improve-document-content-with-ai

Conversation

@aa900031
Copy link
Owner

@aa900031 aa900031 commented Jan 29, 2026

Summary by CodeRabbit

  • Documentation

    • Major rewrites and expansions across guides: data/CRUD, controllers/forms/lists, realtime, auth/authorization, resources, integrations, and richer Vue/Svelte examples and diagrams.
  • New Features

    • Docs now surface mutation modes, loading indicators, multi-backend fetcher patterns, route-sync customization, and clearer composable/controller guidance.
  • Chores

    • Added repo configuration and skill references, static asset serving for stories, updated branding/logo in docs, and updated lint/config ignores.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • pnpm-workspace.yaml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

Adds CI/CodeRabbit config and ESLint ignore patterns, registers several AI agent skill reference files, serves Storybook static assets, applies a one-line realtime call-site tweak, updates many docs and examples across guides/integrations/backends, and switches logo assets to a CDN; no runtime public API implementations were added.

Changes

Cohort / File(s) Summary
Config & Tooling
/.coderabbit.yaml, eslint.config.js
Adds CodeRabbit configuration and disables specific tools; updates ESLint to ignore .agents/skills/**/* and .opencode/skills/**/*.
AI Agent Skill References
.opencode/skills/*
/.opencode/skills/doc-coauthoring, /.opencode/skills/document-writer, /.opencode/skills/mermaid-diagrams, /.opencode/skills/nuxt, /.opencode/skills/nuxt-content, /.opencode/skills/nuxt-ui, /.opencode/skills/vue
Adds small manifest/reference files pointing to agent skill folders; no executable changes.
Storybook
stories/root/.storybook/main.ts
Adds staticDirs: ['../public'] to serve public as Storybook static assets.
Small runtime tweak
packages/core/src/query/realtime.ts
Single-line change: triggerInvalidate call in Auto mode now receives an extra undefined argument before queryClient.
Docs — Intro & Architecture
docs/content/1.guides/0.introduction.md
Rewrites intro, renames sections, clarifies three-layer architecture (Core Functions, Composables, Controllers) and example flows.
Docs — Data (major)
docs/content/1.guides/1.data.md
Large rewrite: formalizes Fetcher interface (getList/getOne/getMany/create*/update*/delete*/custom), expands CRUD/composable guidance, cache invalidation semantics, multi-fetcher examples, and many Vue/Svelte examples.
Docs — Forms / Controllers
docs/content/1.guides/2.form.md
Refactors docs toward Controller-centric patterns, adds isLoading signals, mutation modes (pessimistic/optimistic/undoable), and updated form examples.
Docs — List / Syncing
docs/content/1.guides/3.list.md
Renames list guides, adds permanent filters/sorters, selective sync disabling, custom URL param names, and serialization/deserialization hooks.
Docs — Auth & AuthZ
docs/content/1.guides/4.authentication.md, docs/content/1.guides/5.authorization.md
Adds error-handling patterns, expanded useCanAccess params docs, multiple authorization patterns, and code-group scaffolding with Svelte placeholders.
Docs — Realtime & Notifications
docs/content/1.guides/6.notifications.md, docs/content/1.guides/7.realtime.md
Shifts to code-group examples, introduces Auto/Manual realtime modes, publish/subscribe payload examples, integrated query flow narrative, and scenario-driven samples.
Docs — Resources & Backends
docs/content/1.guides/8.resources.md, docs/content/3.backend/...
Replaces routing narrative with flat/hierarchical resource patterns, adds multi-fetcher guidance, and reorganizes backend provider docs (json-server, Directus, Supabase) with rewritten examples.
Docs Site Assets & Components
docs/app/app.config.ts, docs/app/components/TheLogo.vue, README.md
Switches logo to CDN URL, exposes assets.logo in app config, updates TheLogo to use appConfig.assets.logo, and updates README image link.
Docs package & Misc
docs/package.json, docs/...
Bumps docus to ^5.5.0, many formatting and code-group wrapper edits, Svelte WIP placeholders, and numerous content restructures across docs.

Sequence Diagram(s)

(Skipped — changes are documentation-heavy plus a minor call-site tweak; no new multi-component control flow requiring visualization.)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • chore: docs #99 — Overlaps modifications to the realtime guide (docs/content/1.guides/7.realtime.md) and related documentation edits.

Poem

🐇 I hopped through docs and left tiny tracks,

Linked up skills and tuned the linting stacks,
Forms now hum "saving" with a gentle light,
Realtime got nudged with one extra bite,
The rabbit winked — the docs now sparkle bright. ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'docs: improve document content with ai' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes in the changeset. Replace with a more specific title that highlights the primary documentation improvements, such as 'docs: restructure guides with data model and controller patterns' or 'docs: enhance documentation with comprehensive examples and terminology updates'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/improve-document-content-with-ai

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 29, 2026

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing docs/improve-document-content-with-ai (dfbb6a5) with main (c0640ce)

Open in CodSpeed

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 29, 2026

Open in StackBlitz

@ginjou/core

npm i https://pkg.pr.new/@ginjou/core@103

@ginjou/nuxt

npm i https://pkg.pr.new/@ginjou/nuxt@103

@ginjou/vue

npm i https://pkg.pr.new/@ginjou/vue@103

@ginjou/with-directus

npm i https://pkg.pr.new/@ginjou/with-directus@103

@ginjou/with-rest-api

npm i https://pkg.pr.new/@ginjou/with-rest-api@103

@ginjou/with-supabase

npm i https://pkg.pr.new/@ginjou/with-supabase@103

@ginjou/with-vue-i18n

npm i https://pkg.pr.new/@ginjou/with-vue-i18n@103

@ginjou/with-vue-router

npm i https://pkg.pr.new/@ginjou/with-vue-router@103

commit: dfbb6a5

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 29, 2026

Deploying ginjou with  Cloudflare Pages  Cloudflare Pages

Latest commit: dfbb6a5
Status: ✅  Deploy successful!
Preview URL: https://404c45b3.ginjou.pages.dev
Branch Preview URL: https://docs-improve-document-conten.ginjou.pages.dev

View logs

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.09%. Comparing base (c0640ce) to head (dfbb6a5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #103   +/-   ##
=======================================
  Coverage   55.09%   55.09%           
=======================================
  Files         128      128           
  Lines        3142     3142           
  Branches      771      771           
=======================================
  Hits         1731     1731           
  Misses       1252     1252           
  Partials      159      159           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 29, 2026

Deploying ginjou-storybook with  Cloudflare Pages  Cloudflare Pages

Latest commit: dfbb6a5
Status: ✅  Deploy successful!
Preview URL: https://8c6e509e.ginjou-storybook.pages.dev
Branch Preview URL: https://docs-improve-document-conten.ginjou-storybook.pages.dev

View logs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@docs/content/1.guides/5.authorization.md`:
- Around line 165-178: In authz.access, the parameter named resource is being
shadowed by the local const resource = await getResource(params.id); rename one
of them (e.g., rename the parameter to resourceParam or the local variable to
fetchedResource) and update all uses in the function (including the getResource
call and the can check) so the function uses distinct, descriptive names; ensure
authz.access still calls getCurrentUser() and returns the same can expression
comparing user.department to the correctly named resource field and checking
action in ['read','edit'].

In `@docs/content/1.guides/8.resources.md`:
- Around line 136-163: The example references an undefined resourceMap inside
buildBreadcrumbs causing runtime errors; fix by providing a source for parent
lookups: either define a resourceMap (e.g., populate a Map keyed by resource id
from resolved.value.resources) or replace resourceMap.get(...) with a
composable/helper that resolves a parent by id (create and import a function
like findResourceById) and use it inside buildBreadcrumbs; ensure you reference
useResource/resolved and update buildBreadcrumbs to use the chosen parent-lookup
mechanism so current = <resourceMap or findResourceById>(current.meta?.parent)
is valid.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
docs/content/1.guides/6.notifications.md (1)

6-8: ⚠️ Potential issue | 🟡 Minor

Rename provider section to “Setup.”

Line 6 should use “Setup” for provider registration sections to match documentation standards.
As per coding guidelines: Use 'Setup' for provider registration sections in documentation.

docs/content/1.guides/4.authentication.md (2)

6-8: ⚠️ Potential issue | 🟡 Minor

Rename provider section to “Setup.”

Line 6 should use “Setup” for provider registration sections.
As per coding guidelines: Use 'Setup' for provider registration sections in documentation.


150-191: ⚠️ Potential issue | 🟡 Minor

Add a Success Flow for useAuthenticated and useGetIdentity.

Both Composition sections list Data Composables and Actions but omit Success Flow; the controller doc standard requires all three elements.
Based on learnings: When documenting high-level Controllers, always explain their Composition including Data Composables, Actions, and Success Flow.

docs/content/1.guides/8.resources.md (1)

6-8: ⚠️ Potential issue | 🟡 Minor

Rename provider section to “Setup.”

Line 6 should use “Setup” for provider registration sections.
As per coding guidelines: Use 'Setup' for provider registration sections in documentation.

docs/content/1.guides/7.realtime.md (1)

6-8: ⚠️ Potential issue | 🟡 Minor

Rename provider section to “Setup.”

Line 6 should use “Setup” for provider registration sections.
As per coding guidelines: Use 'Setup' for provider registration sections in documentation.

🤖 Fix all issues with AI agents
In `@docs/content/1.guides/4.authentication.md`:
- Line 234: Update the sentence describing the checkError function to hyphenate
the compound modifier: replace the phrase "error handling patterns" with
"error-handling patterns" in the paragraph that starts "The `checkError`
function examines API errors and determines whether they indicate an
authentication failure." to ensure correct compound adjective usage.

In `@docs/content/1.guides/8.resources.md`:
- Around line 247-250: Update the comment in the call to defineResourceContext
to fix the typo: change "As mention before" to "As mentioned before" in the
inline comment near the resources argument (the defineResourceContext({
resources, // As mention before }) invocation).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
README.md (2)

35-35: ⚠️ Potential issue | 🟡 Minor

Remove numbered prefix from headers.

The header uses a numbered prefix "1. Installation" which violates the coding guideline. As per coding guidelines, do not use numbered headers or redundant suffixes in documentation headers.

📝 Proposed fix
-**1. Installation**
+**Installation**

41-41: ⚠️ Potential issue | 🟡 Minor

Remove numbered prefix from headers.

The header uses a numbered prefix "2. Usage" which violates the coding guideline. As per coding guidelines, do not use numbered headers or redundant suffixes in documentation headers.

📝 Proposed fix
-**2. Usage**
+**Usage**
🤖 Fix all issues with AI agents
In `@README.md`:
- Line 2: The image src currently hardcodes the PR branch in the <img> tag
(alt="Ginjou Logo") which will break after the branch is deleted; update the src
attribute to point to a stable reference (for example the main branch or a
permanent raw URL / CDN that uses the default branch or a release commit hash)
so the logo remains available after merge—locate the <img> tag in README.md and
replace the branch-specific path "docs%2Fimprove-document-content-with-ai" with
the stable branch name (e.g., "main") or a commit/tag-based URL.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/app/app.config.ts`:
- Around line 2-4: The CDN URL for the logo is pinned to a feature branch and
will break when that branch is deleted; update the assets.logo value so it
points to a stable ref (for example replace the jsdelivr tag segment
`@docs%2Fimprove-document-content-with-ai` with `@main` or a release tag/commit
SHA) or, alternatively, revert to serving the static asset from the repo (e.g.,
use the local path `/logo.png`) so the logo is not dependent on an external CDN.
🧹 Nitpick comments (1)
docs/content/1.guides/8.resources.md (1)

247-265: Consider adding import statements for clarity.

The Multiple Fetchers example shows usage of defineResourceContext and defineFetchersContext, but doesn't include import statements. Adding these would make the example more complete and easier for developers to follow.

📝 Suggested addition
+```typescript
+import { defineResourceContext, defineFetchersContext } from '@ginjou/vue'
+
 defineResourceContext({
 	resources, // As mentioned before
 })

Comment on lines 2 to 4
assets: {
logo: 'https://cdn.jsdelivr.net/gh/aa900031/ginjou@docs%2Fimprove-document-content-with-ai/assets/logo.svg',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

CDN URL references the feature branch — will break once the branch is deleted.

The jsdelivr URL is pinned to @docs%2Fimprove-document-content-with-ai. After this PR merges and the branch is deleted, jsdelivr will no longer be able to resolve the asset (cached copies eventually expire). Point the reference to @main (or a release tag / commit SHA) instead.

Also consider whether serving the logo from the repo's own public/ directory (as it was before with /logo.png) would be simpler and more resilient than depending on an external CDN for a static asset.

Proposed fix
 	assets: {
-		logo: 'https://cdn.jsdelivr.net/gh/aa900031/ginjou@docs%2Fimprove-document-content-with-ai/assets/logo.svg',
+		logo: 'https://cdn.jsdelivr.net/gh/aa900031/ginjou@main/assets/logo.svg',
 	},
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
assets: {
logo: 'https://cdn.jsdelivr.net/gh/aa900031/ginjou@docs%2Fimprove-document-content-with-ai/assets/logo.svg',
},
assets: {
logo: 'https://cdn.jsdelivr.net/gh/aa900031/ginjou@main/assets/logo.svg',
},
🤖 Prompt for AI Agents
In `@docs/app/app.config.ts` around lines 2 - 4, The CDN URL for the logo is
pinned to a feature branch and will break when that branch is deleted; update
the assets.logo value so it points to a stable ref (for example replace the
jsdelivr tag segment `@docs%2Fimprove-document-content-with-ai` with `@main` or
a release tag/commit SHA) or, alternatively, revert to serving the static asset
from the repo (e.g., use the local path `/logo.png`) so the logo is not
dependent on an external CDN.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
docs/content/3.backend/supabase.md (1)

39-73: ⚠️ Potential issue | 🟡 Minor

Backend Setup section should demonstrate integration with Nuxt.

The Setup section currently shows Vue and Svelte examples, but according to the coding guidelines, backend documentation should include a Setup section demonstrating integration with all supported frontend frameworks (Vue and Nuxt). The Svelte example can be optional, but Nuxt integration should be included.

Based on learnings: Backend documentation should include a Setup section demonstrating integration with all supported frontend frameworks (Vue and Nuxt).

📝 Suggested addition for Nuxt example

Add a Nuxt tab to the code-group:

<script setup lang="ts">
import { defineAuthContext, defineFetchersContext } from '@ginjou/vue'
import { createAuth, createFetcher } from '@ginjou/with-supabase'
import { createClient } from '@supabase/supabase-js'

const supabaseUrl = 'https://your-project.supabase.co'
const supabaseKey = 'your-anon-key'
const client = createClient(supabaseUrl, supabaseKey)

defineFetchersContext({
	default: createFetcher({ client })
})

defineAuthContext(createAuth({ client }))
</script>

<template>
	<NuxtLayout>
		<NuxtPage />
	</NuxtLayout>
</template>
docs/content/3.backend/rest-api.md (1)

39-68: ⚠️ Potential issue | 🟡 Minor

Backend Setup section should demonstrate integration with Nuxt.

The Setup section currently shows Vue and Svelte examples, but according to the coding guidelines, backend documentation should include a Setup section demonstrating integration with all supported frontend frameworks (Vue and Nuxt). While Svelte can be optional, Nuxt integration should be included.

Based on learnings: Backend documentation should include a Setup section demonstrating integration with all supported frontend frameworks (Vue and Nuxt).

📝 Suggested addition for Nuxt example

Add a Nuxt tab to the code-group:

<script setup lang="ts">
import { defineFetchersContext } from '@ginjou/vue'
import { createFetcher } from '@ginjou/with-rest-api'

defineFetchersContext({
	default: createFetcher({
		url: 'https://api.example.com'
	})
})
</script>

<template>
	<NuxtLayout>
		<NuxtPage />
	</NuxtLayout>
</template>
docs/content/3.backend/directus.md (1)

39-73: ⚠️ Potential issue | 🟡 Minor

Missing Nuxt setup example; replace Svelte WIP placeholder.

The Setup section currently shows Vue and a Svelte WIP placeholder, but is missing a Nuxt example. As per coding guidelines, backend documentation should include a Setup section demonstrating integration with all supported frontend frameworks (Vue and Nuxt). The Svelte block provides no implementation and should either be completed or removed.

📋 Recommended structure

Replace the Svelte WIP block with a Nuxt example:

 ```vue [Vue]
 <script setup lang="ts">
 import { authentication, createDirectus, rest } from '@directus/sdk'
 import { defineAuthContext, defineFetchersContext } from '@ginjou/vue'
 import { createAuth, createFetcher } from '@ginjou/with-directus'
 
 const client = createDirectus('https://your-directus-url.com')
 	.with(rest())
 	.with(authentication())
 
 defineFetchersContext({
 	default: createFetcher({ client })
 })
 
 defineAuthContext(createAuth({ client }))
 </script>
 
 <template>
 	<RouterView />
 </template>

-```svelte [Svelte]
-
-<script>

  • // ...
    -</script>
    +```vue [Nuxt]
    +<script setup lang="ts">
    +import { authentication, createDirectus, rest } from '@directus/sdk'
    +import { defineAuthContext, defineFetchersContext } from '@ginjou/nuxt'
    +import { createAuth, createFetcher } from '@ginjou/with-directus'

+const client = createDirectus('https://your-directus-url.com')

  • .with(rest())
  • .with(authentication())

+defineFetchersContext({

  • default: createFetcher({ client })
    +})

+defineAuthContext(createAuth({ client }))
+</script>
+
+

+

Based on learnings: Backend documentation should include a Setup section demonstrating integration with all supported frontend frameworks (Vue and Nuxt).

🧹 Nitpick comments (2)
docs/content/1.guides/1.data.md (1)

102-107: Svelte WIP placeholders provide no implementation guidance.

Throughout this document, Svelte code blocks contain only <!-- WIP --> placeholders (appearing at lines 102-107, 152-157, 200-205, 249-254, 316-321, and many more). These placeholders don't provide any value to readers trying to implement Svelte integrations.

Consider either:

  • Implementing actual Svelte examples if the framework supports it
  • Removing the WIP blocks entirely until Svelte support is ready
  • Adding a note at the top stating "Svelte examples coming soon"
docs/content/1.guides/8.resources.md (1)

184-189: Svelte WIP placeholder.

Similar to the data guide, this file contains Svelte WIP placeholders that provide no implementation. Consider either completing these examples or removing them until Svelte support is ready.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/content/1.guides/0.introduction.md (1)

106-134: ⚠️ Potential issue | 🟠 Major

Mermaid diagram should show data flow, not just call hierarchy.

The current graph is primarily a dependency/call hierarchy. Please switch to a flow/sequence diagram that shows how data moves between layers (e.g., UI → controller → composables → fetcher → backend → cache → UI).
As per coding guidelines: "Use Mermaid diagrams in documentation to show logic flow and how data moves, not just call hierarchies".

docs/content/1.guides/8.resources.md (1)

6-26: 🛠️ Refactor suggestion | 🟠 Major

Add a dedicated "Setup" section for provider registration.

The document introduces resource concepts but doesn't provide a clear "Setup" section showing how to register the resource provider. The actual registration code (defineResourceContext) appears later in the "Multiple Fetchers" section (line 257), making it difficult for developers to understand basic setup.

As per coding guidelines, use 'Setup' for provider registration sections in documentation. Add a Setup section after line 26 demonstrating basic resource provider registration for both Vue and Nuxt before diving into specific patterns.

📝 Suggested Setup section

Add after line 26:

## Setup

Register your resources using the resource provider context:

::code-group
---
sync: guide-example
---

```vue [Vue]
<script setup lang="ts">
import { defineResourceContext } from '@ginjou/vue'

const resources = [
	{
		name: 'posts',
		list: '/posts',
		create: '/posts/new',
		edit: '/posts/:id/edit',
		show: '/posts/:id',
	},
]

defineResourceContext({ resources })
</script>
<script setup lang="ts">
// In app.vue or app/app.vue
import { defineResourceContext } from '@ginjou/nuxt'

const resources = [
	{
		name: 'posts',
		list: '/posts',
		create: '/posts/new',
		edit: '/posts/:id/edit',
		show: '/posts/:id',
	},
]

defineResourceContext({ resources })
</script>

::

</details>

</blockquote></details>

</blockquote></details>
🤖 Fix all issues with AI agents
In `@docs/content/1.guides/0.introduction.md`:
- Around line 142-151: Update the useList example to explicitly describe its
Controller composition: list the Data Composables (e.g., useGetList for
fetching, any query/state hooks), the Actions provided by useList (e.g.,
refresh, applyFilters, paginate — reference useGo/useLocation where URL-sync
actions occur), and the Success Flow (how useNotify and useTranslate are invoked
on successful operations and how success handlers propagate results). Mention
the lower-level composables that can be combined (useGetList, useGo,
useLocation) and state that useList wires those data composables, exposes action
methods, and triggers notify/translate on success so readers see Data
Composables, Actions, and Success Flow explicitly.

In `@docs/package.json`:
- Line 13: The dependency "docus": "^5.5.0" in package.json is invalid (no such
version on npm); update the version spec for the "docus" dependency to a
published release such as "^4.1.3" or confirm and replace it with the correct
pre-release/private-registry spec, then run npm install to verify; locate the
"docus" entry in package.json to make this change.
🧹 Nitpick comments (2)
docs/content/1.guides/8.resources.md (2)

184-189: Complete Svelte examples for framework parity.

Multiple Svelte examples are marked as "WIP" throughout the document (also at lines 278-283). While Vue examples are comprehensive, the incomplete Svelte code reduces documentation utility for Svelte users.


252-276: Consider showing usage of destructured variables.

Lines 268-274 destructure records and data from useList but don't demonstrate their usage in the template or elsewhere. For documentation clarity, either show how these variables are used or simplify the example to focus on the fetcher configuration aspect.

Comment on lines +142 to +151
### Example: Building a List Page with `useList`

`useList` is a great example of how this works. It bundles several smaller composables to create a full solution for a list page, including:
The `useList` Controller demonstrates the composition pattern in action. It bundles several specialized composables to deliver a complete solution for list pages:

- Data fetching (`useGetList`)
- URL-based pagination and filtering (`useGo`, `useLocation`)
- Automatic success and error messages (`useNotify`)
- Text translation (i18n) (`useTranslate`)
- **Data fetching:** `useGetList` retrieves data from your backend
- **Pagination and filtering:** `useGo` and `useLocation` sync with the URL
- **User feedback:** `useNotify` shows success and error messages
- **Localization:** `useTranslate` handles i18n automatically

You can use `useList` to build your app quickly. But if you need something different, you can use the next level down (`useGetList`) and add your own logic to build a custom solution.
Use `useList` for quick development. When you need something different, step down to lower-level composables like `useGetList` and combine them with your own logic to build a custom solution.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add explicit Controller composition: Data Composables, Actions, Success Flow.

This section explains capabilities but doesn’t explicitly call out the Controller’s Composition in terms of Data Composables, Actions, and Success Flow. Please add a short, explicit breakdown for useList.
Based on learnings: "When documenting high-level Controllers in documentation, always explain their Composition including Data Composables, Actions, and Success Flow".

🤖 Prompt for AI Agents
In `@docs/content/1.guides/0.introduction.md` around lines 142 - 151, Update the
useList example to explicitly describe its Controller composition: list the Data
Composables (e.g., useGetList for fetching, any query/state hooks), the Actions
provided by useList (e.g., refresh, applyFilters, paginate — reference
useGo/useLocation where URL-sync actions occur), and the Success Flow (how
useNotify and useTranslate are invoked on successful operations and how success
handlers propagate results). Mention the lower-level composables that can be
combined (useGetList, useGo, useLocation) and state that useList wires those
data composables, exposes action methods, and triggers notify/translate on
success so readers see Data Composables, Actions, and Success Flow explicitly.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/content/3.backend/supabase.md (1)

35-73: ⚠️ Potential issue | 🟠 Major

Missing Nuxt integration example in Setup section.

The Setup section currently only demonstrates Vue integration. As per coding guidelines, backend documentation should include Setup examples for all supported frontend frameworks (Vue and Nuxt). The Nuxt example should show the proper root component setup with <NuxtPage /> instead of <RouterView />.

As per coding guidelines: "Backend documentation should include a Setup section demonstrating integration with all supported frontend frameworks (Vue and Nuxt)"

📝 Suggested Nuxt example to add

Add a Nuxt tab to the code-group:

<script setup lang="ts">
import { defineAuthContext, defineFetchersContext } from '@ginjou/nuxt'
import { createAuth, createFetcher } from '@ginjou/with-supabase'
import { createClient } from '@supabase/supabase-js'

const supabaseUrl = 'https://your-project.supabase.co'
const supabaseKey = 'your-anon-key'
const client = createClient(supabaseUrl, supabaseKey)

defineFetchersContext({
	default: createFetcher({ client })
})

defineAuthContext(createAuth({ client }))
</script>

<template>
	<NuxtPage />
</template>
docs/content/3.backend/directus.md (1)

35-73: ⚠️ Potential issue | 🟠 Major

Missing Nuxt integration example in Setup section.

The Setup section currently only demonstrates Vue integration. As per coding guidelines, backend documentation should include Setup examples for all supported frontend frameworks (Vue and Nuxt). The Nuxt example should show the proper root component setup with <NuxtPage /> instead of <RouterView />.

As per coding guidelines: "Backend documentation should include a Setup section demonstrating integration with all supported frontend frameworks (Vue and Nuxt)"

📝 Suggested Nuxt example to add

Add a Nuxt tab to the code-group:

<script setup lang="ts">
import { authentication, createDirectus, rest } from '@directus/sdk'
import { defineAuthContext, defineFetchersContext } from '@ginjou/nuxt'
import { createAuth, createFetcher } from '@ginjou/with-directus'

const client = createDirectus('https://your-directus-url.com')
	.with(rest())
	.with(authentication())

defineFetchersContext({
	default: createFetcher({ client })
})

defineAuthContext(createAuth({ client }))
</script>

<template>
	<NuxtPage />
</template>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant